1. Field of the Invention
The present invention relates to pattern inspection apparatus, an image alignment method, a displacement estimation method or a computer program to apply the method. For example, it is related with a technique for pattern inspection which inspects a pattern defect of a template used in manufacturing semiconductor devices, and an apparatus which inspects a defect of a micro-pattern of a photomask, a wafer, or a liquid crystal substrate used in manufacturing a semiconductor device or a liquid crystal display (LCD).
2. Description of Related Art
In recent years, with increasing integration of large volume of large-scale integrated (LSI) circuits, circuit line-widths required for semiconductor devices are becoming narrower and narrower. These semiconductor devices are manufactured by transferring a photo-mask pattern onto a wafer by means of a reduced-magnification-projection exposure apparatus (a stepper) while using a template pattern (called a mask or a reticle, and will be called a mask hereinafter) on which circuit patterns are written. Therefore, a pattern writing apparatus which can write micro-circuits onto a mask is deployed in writing a mask for transferring micro-circuit patterns onto a wafer. A pattern circuit may be directly written onto a wafer by using the pattern direct-writing apparatus. In addition to a writing apparatus using electron beams, a laser beam pattern writing apparatus which uses laser beams to write a pattern is also developed.
Improvement in yield is crucial in manufacturing an LSI which requires a lot of cost. However, as one-gigabit DRAM (Random Access Memory), the precision of a pattern has been changing from sub-microns to nanometers. One of major factors which decrease the yield is pattern defects of a mask pattern used in exposing and transferring a micro-pattern onto a semiconductor wafer by a photolithography technique. In recent years, with miniaturization of an LSI pattern written on a semiconductor wafer, dimensions which have to be detected as a pattern defect are becoming extremely small. Therefore, a pattern inspection apparatus which inspects defects of a transfer mask used in manufacturing an LSI needs to be highly precise.
On the other hand, with development of multimedia, the size of a liquid crystal substrate of an LCD (Liquid Crystal Display) is becoming large: 500 mm×600 mm or more, and miniaturization of a pattern of a thin film transistor (TFT) or the like formed on a liquid crystal substrate is advancing. Therefore, it is required that a considerably small pattern defect should be inspected in a large area. For this reason, development of pattern inspection apparatus which efficiently inspects a defect of a pattern of a large-area LCD and a photomask used in manufacturing the large-area LCD in a short time is urgently required.
As to a conventional pattern inspection apparatus, it is well-known that an inspection is performed by comparing an optical image captured by photographing a pattern written on pattern, such as a lithography mask, at a predetermined magnification by using a magnifying optical system with design data or an optical image captured by photographing the same pattern on the target workpiece (see, e.g., Published Unexamined Japanese Patent Application No. 08-76359 (JP-A-08-76359)).                For example, the following is known as pattern inspection methods: die-to-die inspection which compares optical image data obtained by capturing the same patterns at different positions on the same mask, and die to database inspection which inputs drawing data (design pattern data) obtained by converting CAD data into appropriate format to be inputted by a drawing apparatus when drawing a pattern on a mask, into an inspection apparatus, generates design image data (reference image) based on the inputted drawing data, and compares the generated design image data with an optical image serving as measurement data obtained by capturing an image of the pattern. In these inspecting methods of the inspection apparatus, pattern is placed on a stage to be scanned by a flux of light when the stage moves to perform inspection. The target workpiece is irradiated with flux of light from a light source and an illumination optical system. Light transmitted through the target workpiece or reflected by the target workpiece is focused onto a sensor through an optical system. The image captured by the sensor is transmitted to a comparing circuit as measurement data. In the comparing circuit, after alignment of the images, the measurement data is compared with reference data based on appropriate algorithm. When the measurement data is different from the reference data, it is estimated there to be a pattern defect.        
Herein, the reference image and the optical image are compared in each area of a predetermined size. Highly precise alignment between the reference image and the optical image is required for performing this comparison. A technique for calculating displacement amount or “deviation” between a reference image and an optical image by use of a least-squares method is disclosed in a reference (for example, refer to JP-A-11-153550). Further, an interpolation method for interpolating image data to be obtained by use of neighboring 4-point or 16-point image data is described in a reference (for example, refer to Image Analysis Handbook, pp. 442 to 443, University of Tokyo Press, first edition issued on Jan. 17, 1991).
With a miniaturization of a pattern, there is a demand for a further precision of alignment required for detecting micro-defects. The point herein is to correct only systematic error factors such as a stage placement error, a speed error or a magnification error, but not to correct inconsistent portions that occur locally and randomly such as defects, if possible.
As described above, highly precise alignment between a reference image and an optical image is required for performing comparison. However, with a miniaturization of a pattern, it has become difficult to detect relative displacement between the reference image and the optical image in high precision.